package com.city.service.report.impl;

/**
 * @Author: 李顺时
 * @Description:
 * @Date: Create in 15:08 2018/9/7
 * @Modified By:
 * */

import com.city.domain.report.CtBuild;
import com.city.repository.report.CtBuildRepository;
import com.city.service.report.CtBuildService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CtBuildServiceImpl implements CtBuildService {
    @Autowired
    private CtBuildRepository buildRepository;


    @Override
    public CtBuild findBuildById(Integer id) {
        return buildRepository.findOne(id);
    }

    @Override
    public CtBuild findBuildByCode(String code) {
        return buildRepository.findBuildByCode(code);
    }

    @Override
    public List<CtBuild> findAll() {
        return buildRepository.findAll();
    }

    @Override
    public List<CtBuild> findAllByGathererName(String gathererName) {
        return buildRepository.findAllByGathererName(gathererName);
    }

    @Override
    public CtBuild saveBuild(CtBuild ctBuild) {
        return buildRepository.save(ctBuild);
    }
}
